Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
How to convert unicode point to Emoji || Symbol || Character

I want to convert Unicode Code Points Notation like "U+1F1FA U+1F1F8" to "🇺🇸".

In javaScript, what I have tried so far is

String.fromCharCode(parseInt("U+1F1FA", 16));

But this doesn't work.

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

You can wrap the hex code in braces like this:

console.log('\u{1f1fa}\u{1f1f8}')
about 4 years ago · Juan Pablo Isaza Report

0

You can use the static method String.fromCodePoint() to achieve this.

const us = String.fromCodePoint('0x1F1FA', '0x1F1F8');
console.log(us);

about 4 years ago · Juan Pablo Isaza Report

0

Thanks a lot for above answers. I came with a method to convert the unicode notations to Emoji.

        function unicodeToChar(text:string) {
            const splited = text.split(" ")
            let str = ""
            for(let i = 0;i < splited.length;i++){
                splited[i] = splited[i].replace('U','0')
                splited[i] = splited[i].replace('+','x')
                str += String.fromCodePoint(parseInt(splited[i],16))
            }
            return str
        }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!